package de.casino.strategies;

import de.casino.AbstractStrategy;
import de.casino.Spin;

public class ParoliStrategy extends AbstractStrategy {

   public ParoliStrategy(int startMoney, int startBet, int tableLimit) {
      super(startMoney, startBet, tableLimit);
   }

   protected void handleSpin(Spin s) {
      if (s.isRed()) {
         bankroll += currentBet * 2;
         if (tableLimit > -1 && currentBet * 2 <= tableLimit) {
            currentBet *= 2;
         }
      } else {
         currentBet = startBet;
      }
   }

}
